package com.aisb.manage;

import com.aisb.core.BaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface AuthDao extends BaseDao {
    List userList();

    List roleList();

    List funcList();

    List areaList();

    List funcAll();

    List rolesForUser(@Param("param") Map param); // sql中会判断param是否为空，所以这里必须用@Param显示注明

    List funcsForRole(@Param("param") Map param);

    List funcsForUser(@Param("param") Map param);

    int authAdd(Map param);

    int authAddUserFunc(Map param);

    int authAddRoleFunc(Map param);

    int authAddRoleUser(Map param);

    int authDeleteUserFunc(Map param);

    int authDeleteRoleFunc(Map param);

    int authDeleteRoleUser(Map param);

    int authDeleteRoleUserByUserId(Map param);

    int authDeleteRoleFuncByRoleId(Map param);

    // 数据权限============================================================================================

    int authScopeAddUserArea(Map param);

    int authScopeDeleteUserArea(Map param);

    int authScopeExcludeAddUserArea(Map param);

    int authScopeExcludeDeleteUserArea(Map param);
}
